package com.xyht.medicine_management_system.modules.medicine.service;

import com.xyht.medicine_management_system.common.commonReturn.ResponseResult;
import com.xyht.medicine_management_system.modules.medicine.entity.MmsMedicine;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xyht.medicine_management_system.modules.medicine.entity.req.MmsMedicineAddReq;
import com.xyht.medicine_management_system.modules.medicine.entity.req.MmsMedicineDeletedReq;
import com.xyht.medicine_management_system.modules.medicine.entity.req.MmsMedicineExportReq;
import com.xyht.medicine_management_system.modules.medicine.entity.req.MmsMedicineUpdateReq;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import java.util.concurrent.Future;

/**
 * <p>
 * 药品 服务类
 * </p>
 *
 * @author XYHT
 * @since 2023-11-29
 */
public interface MmsMedicineService extends IService<MmsMedicine> {

    ResponseResult addMedicine(String userId, MmsMedicineAddReq addReq);

    ResponseResult updateMedicine(MmsMedicineUpdateReq updateReq);

    ResponseResult deletedMedicine(MmsMedicineDeletedReq deletedReq);

    ResponseResult getMedicineDetail(String id,String userId);

    ResponseResult getMedicineList(String name,String type,Integer isOn, Integer pageSize, Integer pageNum, String userId);

    Future<ResponseResult> batchAddMedicine(Map<String, Object> map, String user_id);

    Future<ResponseResult> exportMedicine(MmsMedicineExportReq medicineExportReq, HttpServletResponse response);

    ResponseResult checkIsMedicine(String id);
}
